x86, amd_ucode: skip microcode updates for final levels
authorAravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
Tue, 25 Aug 2015 14:17:13 +0000 (16:17 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 25 Aug 2015 14:17:13 +0000 (16:17 +0200)
commit22c5675877c8209adcfdb6bceddb561320374529
treed50e1c302f2e88852e3728cd41d56a3c1a254687
parent901814d68bab33ee448970cf27b0f78328cab8a6
x86, amd_ucode: skip microcode updates for final levels

Some of older[Fam10h] systems require that certain number of
applied microcode patch levels should not be overwritten by
the microcode loader. Otherwise, system hangs are known to occur.

The 'final_levels' of patch ids have been obtained empirically.
Refer bug https://bugzilla.suse.com/show_bug.cgi?id=913996
for details of the issue.

The short version is that people have predominantly noticed
system hang issues when trying to update microcode levels
beyond the patch IDs below.
[0x01000098, 0x0100009f, 0x010000af]

From internal discussions, we gathered that OS/hypervisor
cannot reliably perform microcode updates beyond these levels
due to hardware issues. Therefore, we need to abort microcode
update process if we hit any of these levels.

In this patch, we check for those microcode versions and abort
if the current core has one of those final patch levels applied
by the BIOS

A linux version of the patch has already made it into tip-
http://marc.info/?l=linux-kernel&m=143703405627170

Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/microcode_amd.c